import { history } from '@@/core/history';
import { iframeFunCallExpose } from './utils/iframe';


// 说明当前是 iframe
if(window.top !== window) {

  const gotoPage = (path: string) => {
    history.push(path);
  };

  iframeFunCallExpose({
    gotoPage,
  });

  // 实现隐藏菜单栏和 header 栏的逻辑 

  const style = document.createElement('style');
  style.innerHTML=`
    body {
        background: yellow;
    }
    `;

  // @ts-ignore
  window._isIframeMicro = true;

  document.head.append(style);

}